﻿@*
//------------------------------------------------------------------------------
//  此代码版权声明为全文件覆盖，如有原作者特别声明，会在下方手动补充
//  此代码版权（除特别声明外的代码）归作者本人Diego所有
//  源代码使用协议遵循本仓库的开源协议及附加协议
//  Gitee源代码仓库：https://gitee.com/diego2098/ThingsGateway
//  Github源代码仓库：https://github.com/kimdiego2098/ThingsGateway
//  使用文档：https://diego2098.gitee.io/thingsgateway-docs/
//  QQ群：605534569
//------------------------------------------------------------------------------
*@

@page "/dev/vislog"
@using System.Linq.Expressions;

@inject IVisitLogService VisitLogService
@namespace ThingsGateway.Web.Rcl
@attribute [Authorize]
@inject UserResoures UserResoures
@attribute [RolePermission]
@inherits CultureComponentBase
@layout MainLayout
<AppDataTable @ref="_datatable" TItem="DevLogVisit" SearchItem="VisitLogPageInput"
              AddItem="object" EditItem="object" ShowSelect=false
              SearchModel="@search" IsShowOperCol=false
              QueryCall="QueryCall"
              FilterHeaders="FilterHeaders"
                ShowQueryButton IsShowSearchKey>
    <SearchTemplate>
        <MSelect Style="max-width:200px;"
                 Class="my-1 mx-2 " @bind-Value="context.Category"
                  Outlined Label=@context.Description(x => x.Category)
                 Items=@(CategoryFilters) Clearable
                 MenuProps="@(props => { props.Bottom = true; props.OffsetY = true; })"
                 ItemText=@((u) =>u.Key)
                 ItemValue=@(u => u.Value)
                 HideDetails="true" Height="30"
                  Dense>
        </MSelect>
        <MSelect Style="max-width:200px;"
                 Class="my-1 mx-2 " @bind-Value="context.ExeStatus"
                  Outlined Label=@context.Description(x => x.ExeStatus)
                 Items=@(ExeStatus) Clearable
                 MenuProps="@(props => { props.Bottom = true; props.OffsetY = true; })"
                 ItemText=@((u) =>u.Key)
                 ItemValue=@(u => u.Value)
                 HideDetails="true" Height="30"
                  Dense>
        </MSelect>
        <MTextField Dense Style="max-width:200px;" HideDetails=@("auto") Class="my-1 mx-2 " @bind-Value="context.Account"
                        Outlined Label=@context.Description(x => x.Account) />

    </SearchTemplate>
    <OtherToolbarTemplate>
        @if (@UserResoures.IsHasButtonWithRole("devvislogclear"))
        {
            <MButton Color="error" Class="mx-2 my-1" OnClick=@(ClearClick)>@T("清空")</MButton>
        }
    </OtherToolbarTemplate>

</AppDataTable>



